
<script type="text/javascript" src="../jquery.js"></script>
<script type="text/javascript"> 
$(document).ready(function(){
$(".flip").click(function(){
    $(".panel").slideToggle("slow");
  });
});
</script>
<style type="text/css"> 
div.panel,p.flip
{
margin:0px;
padding:5px;
text-align:center;
background:#e5eecc;
border:solid 1px #c3c3c3;
}
div.panel
{
height:250px ;
width: 300px;
display:none;
text-align:center;
}
</style>
<?php 
    /*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 * autores: Carlos Castillo 
 */
if (isset($_SESSION["k_username"]) && isset($_GET['userq'])){
    include("../basedatos.php"); 
      $baseD = new BaseDatos(); 
      if(!($baseD->existeAmistad($_SESSION["k_username"],$_GET['userq'])) && !($baseD->existeSolicitud($_SESSION["k_username"],$_GET['userq'])) ){ ?>	
            <div class="panel">
            	<form method='post' action='procesarEnvioSolicitud.php?userq=<?=$_GET['userq'];?>'  onsubmit="return show_confirm()">
			Mensaje:<br />
			<textarea name='message' rows='10' cols='30'>
			</textarea><br/>
			<input type='submit' value="Enviar"/>
		</form>
             </div> 
		<p class="flip">Enviar Solicitud</p>
       </div>
  <?php }else if($baseD->existeSolicitud($_SESSION["k_username"],$_GET['userq']))
                          echo" Esperando respuesta";
}?>	

